home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
varia
/
interp18.lha
/
interp-1.8
/
input.cc
< prev
next >
Wrap
Text File
|
1990-01-19
|
3KB
|
88 lines
// This is an input file for the interpreter.
2;
double a;
a = 3 ;
print_value(2+4*5);
print_value(4*atan(1.));
syntaxof a = 3 ;
while (a) a = a - 1 ;
double b=1;
syntaxof if (b) {a = -5.; while (a++) print_value (a);}
sin(0.);
a=2;
a=3+4*8-2;
print_value (4);
print_value (a);
2.;
print_value (sin(0.));
double PI = 4*atan(1.);
print_value (PI);
// parameters:
double cm = .1 ; // microfarads per square centimeter
double fc = 96500.0 ;
double taup = 10000.0 ;
double volc = 4.0e-4 ;
double voli = 2.5e-3 ;
double mgi = 2.5 ;
double nab = 110. ;
double kb = 2.5 ;
double cab = 2.5 ;
// state variables:
double rint = .118; // specific internal resistivity in Kohm-cm
double rext = .070; // specific extracellular resistivity in Kohm-cm
double a_radius = 0.00035; // cell radius in cm
double b_radius = 0.0003731; // cleft (outer) radius in cm
double cell_length = .025 ; // cell length in cm (250 microns)
double specific_capacitance = 2;// cell capacitance in micro farads per cm^2
// cell surface area in cm^2
double cell_area = 2 * PI * a_radius * cell_length ;
//cell_area = 5e-05; // cell surface area in cm^2
double cavioli = 1 ; // cell surface area correction factor
double nodes_per_cell = 25; //
print_value (nodes_per_cell);
// spatial step size in cm
double d_z = cell_length / nodes_per_cell;
double alphadt = 4.0 * PI * cavioli * (cm / nodes_per_cell) * d_z * d_z;
double pi4dh2 = 4.0 * PI * cavioli * a_radius * d_z * d_z;
// pi4dh2 / cell_area
print_value (pi4dh2 / cell_area) ;
//
// set up the uniform properties of the strand.
double r_i0 = rint / (PI * a_radius * a_radius);
double r_o0 = rext / (PI * ((b_radius * b_radius) - (a_radius * a_radius)));
double r_d_series = 0.1; // specific series resistance in ohms-cm^2
double r_d_shunt = 1e+10; // shunt resistance in Kohms
// .001 cooresponds to 1.8 Mohm disc resistance
double junctional_area = .001; // fractional area of the disc
// disk resistances:
double R1 = (rint * d_z / (PI * a_radius * a_radius)
+ r_d_series * d_z / (junctional_area * cell_area)) / 2.0;
double R2 = (rint * d_z / (PI * a_radius * a_radius)
+ r_d_series * d_z / (junctional_area * cell_area)) / 2.0;
double r = r_d_shunt;
double Ro = rext * d_z/(2.*PI *((b_radius * b_radius) - (a_radius * a_radius)));
// transform the T-network to a pi-network
double r1 = R2 + Ro + r + r * (R2 + Ro) / (R1 + Ro);
double r2 = r + (R2 + Ro + r) * (R1 + Ro) / (R2 + Ro);
double r3 = (R2 + Ro + r * (R1 + R2) / (R1 + Ro)) * (R1 + Ro) / r;
double r4 = 2.0 * Ro;
print_value (r1);
print_value (r2);
print_value (r3);
print_value (r4);
print_table(0);
// Local variables:
// compile-command: "make -k test"
// End: